package com.mc.algorithm;

public class ThirtyNine {
	public static int depth(Node node){
		if(node==null)
			return 0;
		return Math.max(depth(node.left), depth(node.right))+1;
	}
	
	static class Node{
		Node left;
		Node right;
		int value;
	}
	public static void main(String[] args) {
		Node tree = new Node();
		Node left = new Node();
		Node right = new Node();
		tree.left = left;
		left.right = right;
		int res = ThirtyNine.depth(tree);
		System.out.println(res);
	}
}
